Step 10: GitHub Secrets
Create a GitHub repository for this project. Go to the GitHub repository for this project and select the “Settings” tab. Then, under the “Security” heading, open “Secrets” and the select “Actions.”
By clicking on the “New repository secret" button you can add “secrets” to your repository! Add the following secrets:
HEROKU_APP_NAME
is the name of the Heroku app you’ve created for this project.HEROKU_AUTH_EMAIL
is the email you use to log to your Heroku account.HEROKU_AUTH_TOKEN
is your API key to programmatically interface with Heroku. Go to https://dashboard.heroku.com/account to reveal your API Key.
Now push your code to the repository. The GitHub Action should get triggered and deploy your API.
My server is deployed at https://hello-api-fsjs.herokuapp.com/. Open your browser and try the following endpoints:
- https://hello-api-fsjs.herokuapp.com/
- https://hello-api-fsjs.herokuapp.com/schools
- https://hello-api-fsjs.herokuapp.com/terms
- https://hello-api-fsjs.herokuapp.com/courses
Try these endpoints in the Postman, too (as HTTP Get requests).